#include <iostream>
#include <string>
using namespace std;

class Student {
	private:
		string name;
		int age;
	
	public:
		Student(string n="biubiubiu", int a=119): name(n), age(a) {
			cout << "Constructing..." << endl;
		}
		~Student() {
			cout << "Destroying..." << endl;
		}
		Student(Student & obj) {
			cout << "Copy Constructing..." << endl; 
			name = obj.name;
			age	 = obj.age;
		} 
		friend ostream & operator << (ostream & stream, const Student & obj); 
};

ostream & operator << (ostream & stream, const Student & obj) {
	stream << obj.name << ": "<< obj.age;

	return stream;
}

int main(int argc, char * argv[]) {
	Student s1("xxx", 19);
	
	cout << s1 << endl;

	Student s2(s1);

	cout << s2 << endl;
	return 0;
}
